<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('users',function (Blueprint $table){
            $table->increments('id');
            $table->integer('company_id')->default(0);
            $table->string('account');
            $table->string('phone')->nullable();
            $table->decimal('balance')->default(0);
            $table->string('password');
            $table->string('login_token');
            $table->string('initial_password')->default('')->comment('初始密码');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
